<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page contentType="text/html;charset=utf-8"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<%= request.getContextPath() + "/css/bloques.css" %>"
	rel="stylesheet" type="text/css">
<title>untitled</title>
<script type="text/javascript">

    function setValues(Codigo, Nombre)
         {
        opener.document.frmIngresarSede.codsede.value = Codigo ;
        opener.document.frmIngresarSede.subsede.value = Nombre;
        window.close();                 
         }
      function fBuscar(){
        document.frmBuscarSede.submit();
        }
    
    </script>
</head>
<body>

	<P></P>
	<P align="center">&nbsp;</P>
	<div align="center">
		<table
			style="width: 80%; border: 0; padding: 2px; border-spacing: 1px;">
			<tr>
				<td>
					<DIV align="center" class="titulosenblanco">ADMINISTRACION DE
						SEDES</DIV>
				</td>
			</tr>
		</table>
	</div>
	<P align="center"></P>


	<form name="frmBuscarSede" method="POST"
		action="<%= request.getContextPath() + "/Sedes/ConsultarSubSede.do" %>">
		<div align="center">
			<table
				style="width: 80%; border: 0; padding: 3px; border-spacing: 3px;">
				<tr>
					<td width="2%">&nbsp;</td>
					<td width="8%" class="celdatabla">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
					<td width="2%">&nbsp;</td>
					<td width="2%">&nbsp;</td>
					<td width="2%">&nbsp;</td>
					<td width="8%" class="celdatabla"><STRONG>Nombre</STRONG></td>
					<td width="76%" colspan="2"><input type="text" class="form"
						name="Sede" maxlength="50" size="50" /></td>
				</tr>
				<tr>
					<td width="2%">&nbsp;</td>
					<td width="8%">&nbsp;</td>
					<td width="2%">&nbsp;</td>
					<td width="2%">&nbsp;</td>
					<td width="2%">&nbsp;</td>
					<td width="8%">&nbsp;</td>
					<td width="76%" colspan="2">&nbsp;</td>
				</tr>
				<tr>
					<td width="2%">&nbsp;</td>
					<td width="8%">&nbsp;</td>
					<td width="2%">
						<DIV align="center">&nbsp;</DIV>
					</td>
					<td width="2%">&nbsp;</td>
					<td width="2%">&nbsp;</td>
					<td width="8%">&nbsp;</td>
					<td width="47%">&nbsp; <input type="button" value="Buscar"
						onclick="fBuscar()" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input
						type="HIDDEN" name="ori" value="">
					</td>
					<td width="31%" />
				</tr>
			</table>
		</div>

		<div align="center">
			<table class="claseGenericaWidth90">
				<tr>
					<td><logic:notPresent scope="request" name="sedes">
							<logic:present scope="request" name="msg">
								<DIV align="center"><%=request.getAttribute("msg")%></DIV>
							</logic:present>
						</logic:notPresent> <logic:present scope="request" name="sedes">
							<display:table name="requestScope.sedes"
								requestURI='<%= request.getContextPath() + "/Sedes/ConsultarSedes.do" %>'
								class="bordesTable" pagesize="20" id="sede" cellpadding="3"
								cellspacing="1" style="width:100%">
								<display:column headerClass="headerTable" title="Codigo"
									class="Numero" sortable="false">
									<bean:write name="sede" property="code" />
								</display:column>
								<display:column headerClass="headerTable" title="Sede"
									class="Numero">
									<bean:write name="sede" property="nombre" />
								</display:column>
								<bean:define id="Codigo" name="sede" property="code"></bean:define>
								<bean:define id="Nombre" name="sede" property="nombre"></bean:define>
								<display:column headerClass="headerTable" title="Seleccionar"
									class="Numero">
									<input type="radio" name="seleccionar"
										onclick='setValues("<%=Codigo%>","<%=Nombre%>")'>
								</display:column>
							</display:table>
						</logic:present></td>
				</tr>
			</table>
		</div>

	</form>
	<P align="center">&nbsp;</P>
</body>
</html>
